import request from '@/utils/request'

// 以树形结构获取所有商品分类
export const getCategoryTreeList = () => {
  return request({
      method: 'GET',
      url: '/product/categoryTreeList',
  })
}

// 综合搜索、筛选、排序
export const getProductSearch = params => {
  return request({
      method: 'GET',
      url: '/product/search',
      params
  })
}

// 获取前台商品详情
export const getProductDetail = id => {
  return request({
      method: 'GET',
      url: `/product/detail/${id}`
  })
}
